﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;

namespace Yugi_Gui
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public App()
        {
            if (Yugi_Gui.Properties.Settings.Default.IsUseDns == false)
            {
                Yugi.Client.Program.IP_SERVER = Yugi_Gui.Properties.Settings.Default.IP_SERVER;
                Yugi.Client.Program.IP_LOGIN_SERVER = Yugi_Gui.Properties.Settings.Default.IP_MAINSERVER;
                Yugi.Client.Program.PORT_LOGIN_SERVER = Int32.Parse(Yugi_Gui.Properties.Settings.Default.PORT_MAINSERVER);
            }
            else
                Yugi.Client.Program.IP_SERVER = System.Net.Dns.GetHostAddresses(Yugi_Gui.Properties.Settings.Default.DNS)[0].ToString();
        }
    }
}
